﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ERPTOOLS.Class;

namespace ERPTOOLS
{
    public partial class Cyc : Form
    {
        CheckBox _cb;
        String _source;
        public Cyc(CheckBox cb,String source)
        {
            _cb = cb;
            _source = source;
            InitializeComponent();
            this.Text = cb.Text;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Cyc_Load(object sender, EventArgs e)
        {
            dateTimePicker1.Text = (XMLHelper.GetInnerTextByXpath("Configure.xml", "//" + _source + "StrDate"));
            dateTimePicker2.Text = (XMLHelper.GetInnerTextByXpath("Configure.xml", "//" + _source + "EndDate"));
            comboBox1.Text = (XMLHelper.GetInnerTextByXpath("Configure.xml", "//" + _source + "CYC"));
            numericUpDown1.Text = XMLHelper.GetInnerTextByXpath("Configure.xml", "//" + _source + "Interval");
            textBox3.Text = (XMLHelper.GetInnerTextByXpath("Configure.xml", "//" + _source + "Execute"));
        }
    }
}
